<?php echo bck_render_('ads-mobile-top-1-300x300');?>
<section>
    <div class="blk" id="msw-main">
        <?php echo views_embed_view('msw_home_1', 'block'); ?>
    </div>
</section>

<!--
<section>
    <div class="blk" id="msw-blog">
        <h3 class="blk-title"><span>BLOG</span></h3>
        <?php // echo views_embed_view('msw_home_1', 'block_1'); ?>
    </div>
    <div class="blk" id="msw-blog-ad">
        <?php // echo bck_render_('ads-mobile-top-2-300x300');?>
    </div>
</section>
-->

<section>
    <div class="blk" id="msw-latest">
        <h3 class="blk-title"><span>LATEST</span></h3>
        <?php echo  views_embed_view('msw_home_1', 'block_3'); ?>
    </div>
</section>

<div id="msw-app" ng-app="msw" ng-controller="mswCtrl">
    <section>
        <div class="blk" id="msw-search">
            <div id="search-alphabet">
                <label ng-repeat="a in alphabet">
                    <input type="checkbox" checklist-model="selected.alphabet" checklist-value="a">
                    <span ng-bind="a"></span>
                </label>
            </div>
            <div id="search-industry">
                <label ng-repeat="a in industry">
                    <input type="checkbox" checklist-model="selected.industry" checklist-value="a.tid">
                    <span ng-bind-html="a.field_name_english"></span>
                </label>
            </div>
            <div id="search-input">
                <label>
                    <input type="text" ng-model="searchText" placeholder="Search…" ng-keyup="onKeyup($event)">
                    <div id="search-submit" ng-click="search()"></div>
                </label>
                <button id="search-reset" ng-click="reset()">Reset</button>
            </div>
        </div>
    </section>

    <section>
        <div class="blk" id="msw-mostview">
            <div id="msw-search-loading" ng-show="loading" class="fade">Loading...</div>
            <h3 class="blk-title" ng-hide="hasFilter"><span>MOST VIEW</span></h3>
            <div class="bottom-list" ng-hide="hasFilter">
                <div class="bottom-item" ng-repeat="(k,v) in mostview">
                    <div class="bottom-image" ng-bind-html="v.field_msw_image"></div>
                    <div class="bottom-content">
                        <h3 ng-bind-html="v.field_msw_english_name"></h3>
                        <h5 ng-bind-html="v.field_award_cat"></h5>
                        <h4 ng-bind="v.field_msw_title"></h4>
                    </div>
                </div>
            </div>
            <div class="bottom-list" ng-show="hasFilter">
                <h3 class="no-result" ng-show="searchResult.length == 0">No result found.</h3>
                <div class="bottom-item" ng-repeat="(k,v) in searchResult">
                    <div class="bottom-image" ng-bind-html="v.field_msw_image"></div>
                    <div class="bottom-content">
                        <h3 ng-bind-html="v.field_msw_english_name"></h3>
                        <h5 ng-bind-html="v.field_award_cat"></h5>
                        <h4 ng-bind="v.field_msw_title"></h4>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
